package cn.jinjimi.domain.store;

import cn.jinjimi.domain.data.dto.ArticleAllListDTO;
import cn.jinjimi.domain.data.dto.ArticleListDTO;
import cn.jinjimi.domain.data.dto.ArticleRecommendListDTO;
import cn.jinjimi.app.entity.Article;
import cn.jinjimi.app.entity.ArticleMeta;
import cn.jinjimi.app.entity.SharedCount;

import java.io.IOException;
import java.util.List;

/**
 * Created by zhenhua on 16/8/1.
 */
public interface ReaderStore {

    SharedCount fetchSharedCount() throws IOException;

    Article recordShare(String articleId, String comment, String showAds) throws IOException;

    Article collect(String ssoid, String articleId) throws IOException;

    boolean unCollect(String articleId) throws IOException;

    ArticleMeta getArticleMetaData(String articleId) throws IOException;

    List<Article> getCollects(String ssoid, int page, int limit) throws IOException;

    List<Article> getArticlesOfWeek(String ssoid) throws IOException;

    ArticleListDTO searchArticles(String title, int page, int limit) throws IOException;

    ArticleRecommendListDTO getRecommendArticleList(int offset, int limit) throws IOException;

    ArticleAllListDTO getAllArticleList(int page, int limit) throws IOException;
}
